package com.zhaotianhao.rentingservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDate;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author Z-7
 * @since 2022-05-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_renting")
@Document(type = "month",indexName = "rent")
public class Renting implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 租房合同编号(雪花算法生成)
     */
    @TableId(value = "number",type = IdType.INPUT)
    @Id
    private Long number;

    /**
     * 租客
     */
    private String renter;

    /**
     * 电话
     */
    private String phone;

    /**
     * 房源信息
     */
    private String message;

    /**
     * 房源类型
     */
    private Integer typeId;

    /**
     * 起租日期
     */
    @DateTimeFormat(pattern = "yyyy/MM/dd")
    @JsonFormat(pattern = "yyyy/MM/dd",timezone = "GMT+8")
    private Date startRent;

    /**
     * 结束日期
     */
    @DateTimeFormat(pattern = "yyyy/MM/dd")
    @JsonFormat(pattern = "yyyy/MM/dd",timezone = "GMT+8")
    private Date endRent;

    /**
     * 押付方式
     */
    private String oshitsukeType;

    /**
     * 押金
     */
    private Double deposit;

    /**
     * 租金
     */
    private Double rental;


}
